import axios from '@/libs/axios1'
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' }
let base = '/testplatform/productOwnership'

// 查询资产单位列表
export const queryProductOwnershipList = params => {
    return axios({
        url: `${base}/getPage`,
        method: 'GET',
        params,
        headers: jsonHeaders,
    })
}

// 创建资产单位
export const addProductOwnership = data => {
    return axios({
        url: `${base}`,
        method: 'POST',
        data,
        headers: jsonHeaders,
    })
}

// 修改资产单位
export const updateProductOwnership = data => {
    return axios({
        url: `${base}`,
        method: 'PUT',
        data,
        headers: jsonHeaders,
    })
}

// 删除资产单位
export const deleteProductOwnership = id => {
    return axios({
        url: `${base}/${id}`,
        method: 'DELETE',
        headers: jsonHeaders,
    })
}
